package com.guodi.model.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guodi.core.tool.api.R;
import com.guodi.model.entity.IdtFillTaskMessage;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import lombok.extern.slf4j.Slf4j;


import org.springframework.web.bind.annotation.RestController;
import com.guodi.core.boot.ctrl.BaseController;
import io.swagger.annotations.Api;
import javax.annotation.Resource;
import com.guodi.model.service.IIdtFillTaskMessageService;
import org.springframework.validation.annotation.Validated;
import springfox.documentation.annotations.ApiIgnore;

/**
* 指标填报任务消息表 前端控制器
* @author lzy
* @date 2023-05-10
*/
@Slf4j
@Validated
@RestController
@RequestMapping("/IdtFillTaskMessage")
@Api(value = "API - IdtFillTaskMessageController", tags = "指标填报任务消息表")
public class IdtFillTaskMessageController extends BaseController {

    @Resource
    private IIdtFillTaskMessageService iIdtFillTaskMessageService;


    /**
     * @描述: 指标填报消息列表
     * @入参:
     * @出参:
     * @作者: lzy
     * @日期: 2023/5/17 9:51
     **/
    @RequestMapping("/fillTaskMessages")
    @ApiOperation(value = "指标填报消息列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "current", value = "当前页索引", required = true, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "size", value = "页面记录大小", required = true, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "resolved", value = "是否已处理（0：未处理，1：已处理）", required = true, dataType = "long", paramType = "query")
    })
    public R fillTaskMessages(@ApiIgnore Page page, String resolved){
        IPage<IdtFillTaskMessage> iPage = this.iIdtFillTaskMessageService.fillTaskMessages(page, resolved);
        return R.data(iPage);
    }

    /**
     * @描述: 指标填报消息通知数
     * @入参:
     * @出参:
     * @作者: lzy
     * @日期: 2023/5/17 9:51
     **/
    @RequestMapping("/messageCount")
    @ApiOperation(value = "指标填报消息通知数")
    public R messageCount(){
        Integer count = this.iIdtFillTaskMessageService.messageCount();
        return R.data(count);
    }


}
